package org.springframework;

import org.springframework.config.ContextConfig;
import org.springframework.pojo.UserModule;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class ContextApplication {

	public static void main(String[] args) {
		System.out.println("启动...........");

		long startTime = System.currentTimeMillis();

		System.out.println("开始时间:" + startTime + "毫秒");


		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(
				ContextConfig.class
		);

		UserModule bean = context.getBean(UserModule.class);

		System.out.println("信息:" + bean.toString());


		long endTime = System.currentTimeMillis();

		System.out.println("结束时间:" + endTime + "毫秒");

		System.out.println("耗时:" + (endTime - startTime) + "毫秒");


	}
}
